import 'package:factoryside/bean/fee_order_entity.dart';

feeOrderEntityFromJson(FeeOrderEntity data, Map<String, dynamic> json) {
	if (json['OrderID'] != null) {
		data.orderID = json['OrderID'] is String
				? int.tryParse(json['OrderID'])
				: json['OrderID'].toInt();
	}
	if (json['FeeNumber'] != null) {
		data.feeNumber = json['FeeNumber'].toString();
	}
	if (json['OrderFeeApplicationID'] != null) {
		data.orderFeeApplicationID = json['OrderFeeApplicationID'] is String
				? int.tryParse(json['OrderFeeApplicationID'])
				: json['OrderFeeApplicationID'].toInt();
	}
	if (json['State'] != null) {
		data.state = json['State'] is String
				? int.tryParse(json['State'])
				: json['State'].toInt();
	}
	if (json['StateTxt'] != null) {
		data.stateTxt = json['StateTxt'].toString();
	}
	if (json['orderState'] != null) {
		data.orderState = json['orderState'].toString();
	}
	if (json['SendUser'] != null) {
		data.sendUser = json['SendUser'].toString();
	}
	if (json['StateHtml'] != null) {
		data.stateHtml = json['StateHtml'].toString();
	}
	if (json['CreateDate'] != null) {
		data.createDate = json['CreateDate'].toString();
	}
	if (json['ApplicationAmount'] != null) {
		data.applicationAmount = json['ApplicationAmount'] is String
				? double.tryParse(json['ApplicationAmount'])
				: json['ApplicationAmount'].toDouble();
	}
	if (json['Name'] != null) {
		data.name = json['Name'].toString();
	}
	if (json['ApplicationNotes'] != null) {
		data.applicationNotes = json['ApplicationNotes'].toString();
	}
	return data;
}

Map<String, dynamic> feeOrderEntityToJson(FeeOrderEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['OrderID'] = entity.orderID;
	data['FeeNumber'] = entity.feeNumber;
	data['OrderFeeApplicationID'] = entity.orderFeeApplicationID;
	data['State'] = entity.state;
	data['StateTxt'] = entity.stateTxt;
	data['orderState'] = entity.orderState;
	data['SendUser'] = entity.sendUser;
	data['StateHtml'] = entity.stateHtml;
	data['CreateDate'] = entity.createDate;
	data['ApplicationAmount'] = entity.applicationAmount;
	data['Name'] = entity.name;
	data['ApplicationNotes'] = entity.applicationNotes;
	return data;
}